package renpyas3.model.structs
{
	/**
	 * data structure to store choices
	 */
	public class RenpyMenu
	{
		private var _choicesList:Vector.<MenuChoice>;
		
		public function RenpyMenu() 
		{
			_choicesList = new Vector.<MenuChoice>();
		}

		/**
		 * adds a new choice, new button to this menu
		 */
		public function addChoice(line:String, lineNumber:uint, nextInstructionIndex:uint):void
		{
			var newChoice:MenuChoice = new MenuChoice(line, lineNumber, nextInstructionIndex);
			_choicesList.push(newChoice);
		}
		
		/**
		 * specifies destination (label) to jump to when the button is clicked
		 * for the last choice added
		 
		public function addJumpDestination(labelName:String):void
		{
			if (_choicesList.length > 0 && _choicesList[_choicesList.length-1] != null)
			{
				_choicesList[_choicesList.length-1].addJumpDestination(labelName);
			}
			else
			{
				Logger.info("RenpyMenu::addJumpDestination ERROR no choice defined to add this jump destination:", labelName);
			}
		}
		*/
		
		public function get choicesList():Vector.<MenuChoice> { return _choicesList; }
		
		
	}

}